package mall.pojo;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.json.simple.JSONObject;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
@Scope("session")
public class Cart {
	private String sessionId;
	// private HashMap<Integer,Item> items=new HashMap<Integer, Item>();
	private List<Item> items = new ArrayList<Item>();		
	private String listString;	
	public String getListString() {
		return listString;
	}

	public void setListString(String listString) {
		this.listString = listString;
	}

	public Cart(String sessionId, List<Item> items) {
		super();
		this.sessionId = sessionId;
		this.items = items;
	}

	public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	public List<Item> getItems() {
		return items;
	}

	public void setItems(List<Item> items) {
		this.items = items;
	}

	public Cart() {
		super();
	}

}
